<template>
	<view class="content">
		<view class="topBox">
			<view>扣押奖金</view>
			<view class="moneyTxt">{{blance.hide_money}}</view>
			<view style="width: 100%;overflow: hidden;">
				<button @click="seePoups=!seePoups" style="float: left;">转入余额</button>
			</view>
		</view>
		<view class="list">
			<!-- <view class="line list-title item-flex">
				<view>明细</view>
				<view>金额</view>
				<view>日期</view>
			</view> -->
			<view class="line item-flex" v-for="(item,index) in blance.log">
				<view style="text-align: left;width: 70%;">
					<!-- <view >
						{{item.momo}}
					</view> -->
					<view style="color: #999;font-size: 28rpx;">{{item.time}}</view>
				</view>
				<view style="text-align: right;width: 30%;">
					
					<view class="item-flex flex-center">
						<!-- <view style="color:red ;" v-if="item.type==1">+{{item.money}}</view> -->
						<view style="color: black;" >{{item.money}}</view>
					</view>
				</view>
				
				
				
			</view>
		</view>
		<view class="marke" v-show="seePoups">
			<view class="withdraw">
				<icon @click="seePoups=false" class="cancel" type="clear" size="24" color="#ccc"></icon>
				<view class="markeTitle">转入余额</view>
				
				<input class="moneyBox" type="digit" cursor-spacing="50px" placeholder="请输入转入金额" :value="number"
					placeholder-class="tips" @blur="changenumber" />
				<button @click="tijiao2">确定</button>
		
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				startDate: "2021-09",
				endDate: "2021-10",
				date: "2021-10",
				seePoup: false,
				blance: '',
				userinfo: '',
				number: '',
				seePoups: false,
				uid: '',
				path: '../static/shangchuan.png',
				imgshow:false,
				value: 0,
			}
		},
		onLoad() {

			uni.getStorage({
				key: 'userInfo',
				success: (res) => {
					
					this.userinfo = res.data;
					if (this.userinfo == '') {
						window.location.href =
							'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx07a4d569291b9064&redirect_uri=http%3A%2F%2Fgyxlh5.njkw668.com%2F%23%2Fpages%2Fpublic%2Flogin&response_type=code&scope=snsapi_userinfo&state=0#wechat_redirect';
					}
					//this.getUserLists()
				},
				fail: (res) => {
					window.location.href =
						'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx07a4d569291b9064&redirect_uri=http%3A%2F%2Fgyxlh5.njkw668.com%2F%23%2Fpages%2Fpublic%2Flogin&response_type=code&scope=snsapi_userinfo&state=0#wechat_redirect';
				}
			});
			this.getuserblance()

		},
		methods: {
			async tijiao2() {
			
				const res = await this.$myRequest({
					url: 'index.php/api/user/hide_moneychangemoney',
					method: "POST",
					data: {
						"member_id": this.userinfo.member_id,
						'hide_money': this.number,
					},
				})
				
					uni.showToast({
						title: res.data,
						icon: 'none'
					})
				
					
				this.getuserblance()
			},
			changenumber(e) {
			
				this.number = e.detail.value
				//console.log(e)
			
			},
			async getuserblance() {
				//console.log(this.userinfo,'aaaaaaaaaa')
				const res = await this.$myRequest({
					url: 'index.php/api/user/hidenbalance',
					method: "POST",
					data: {
						"member_id": this.userinfo.member_id
					},
				})
				this.blance = res.data
			}
		}
	}
</script>

<style>
	.postformcontentlevel{
		display: flex;
		height: 100rpx;
		line-height: 100rpx;
		width: 90%;
		margin: 0 auto;
	}
	.text-sm2{
		width: 70%;
		margin: 0 auto;
		height: 100rpx;
		line-height: 100rpx;
		text-align: center;
		background-repeat: no-repeat;
		background-size:100% 100%;
	}
	.text-sm{
		width: 50%;
		margin: 0 auto;
		height: 100rpx;
		line-height: 100rpx;
		text-align: center;
		background-repeat: no-repeat;
		background-size:20% ;
		background-position-x: left;
		background-position-y: center;
	}
	.item-flex {
		display: flex;
		align-items: center;
	}

	.flex-center {
		justify-content: center;
	}

	.flex-around {
		justify-content: space-around;
	}

	page {
		background: #f5f5f5;
	}

	.topBox {
		width: 100%;
		padding: 10rpx 3%;
		font-size: 32rpx;
		color: #ececec;
		height: 320rpx;
		background: linear-gradient(to right, #3464E3, #1A55EA);
		display: flex;
		flex-direction: column;
		justify-content: space-around;
		align-items: center;
	}

	.topBox button {
		font-size: 32rpx;
		float: left;
	}

	.moneyTxt {
		font-size: 64rpx;
		color: #fff;
		font-weight: bold;
	}

	.top-line {
		width: 100%;
		flex: 1;
		padding: 10rpx 3%;
		height: 72rpx;
		line-height: 72rpx;
	}

	.list {
		width: 100%;
		padding: 0 3%;
		background: #fff;
	}

	.list .line:last-child {
		border: none
	}

	.line {
		width: 100%;
		flex: 1;
		height: 88rpx;
		line-height: 88rpx;
		border-bottom: 2rpx solid #ebebeb;
	}

	.line view,
	.sumTxt view {
		width: 100%;
		text-align: center;
		text-overflow: ellipsis;
		overflow: hidden;
		white-space: nowrap;
	}

	.line image {
		width: 48rpx;
		border-radius: 50%;
		margin-right: 10rpx;
	}

	.changeMonth {
		width: 30%;
		margin-right: 10%;
		position: relative;
	}

	.changeMonth picker {
		width: 100%;
	}

	.changeMonth image {
		width: 32rpx;
		position: absolute;
		right: 0;
		top: 20rpx;
	}

	.changeIcon {
		width: 32rpx;
	}

	.sumTxt {
		width: 60%;
		font-size: 28rpx;
		color: #999;
	}

	.marke {
		width: 100%;
		height: 100%;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 990;
		background: rgba(0, 0, 0, 0.7);
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.withdraw {
		width: 80%;
		background: #fff;
		border-radius: 20rpx;
		position: relative;
	}

	.markeTitle {
		width: 100%;
		height: 88rpx;
		line-height: 88rpx;
		font-size: 32rpx;
		color: #333;
		text-align: center;
		background: #f5f5f5;
		border-radius: 20rpx 20rpx 0 0;
	}

	.moneyBox {
		width: 90%;
		height: 100rpx;
		line-height: 100rpx;
		border-bottom: 2rpx solid red;
		margin: 20rpx 5%;
		text-align: center;
		font-size: 42rpx;
		font-weight: bold;
		color: red;
	}

	.tips {
		font-size: 30rpx;
		color: #bebebe;
		text-align: center;
		font-weight: normal;
	}

	.withdraw button {
		width: 90%;
		margin: 20rpx 5%;
		margin-top: 40rpx;
		font-size: 32rpx;
		height: 88rpx;
		line-height: 88rpx;
		border: none;
		background: #007AFF;
		color: #fff;
	}

	.withdraw button::after {
		border: none;
	}

	.cancel {
		position: absolute;
		top: -20rpx;
		right: -20rpx;
		background: #fff;
		border-radius: 50%;
		z-index: 999;

	}
</style>